#pragma once

namespace	MomogenkyouSystem	{

//	Renders a full quad based on size, for spritesheets use another one
class Quad
{
protected:
	static			Vertex		g_Vertices[4];		//	Vertices that are for calculating anything including texture coords
	static			Vertex		g_constVertices[4];	//	Vertices that are only used for their positions
	static	const	short		g_Indices[6];
public:
	//	Render a single Quad
	//	@param	vWidthHeight	Specify the Width and height, scaling is 1:1
	//	@param	vPosition		Specify the Position, w should always be 1.0
	//	@param	vColor			Specify the Color in float units
	//	@param	fRotation		Specify the Rotation in Radians
	static	void		RenderQuad(		const	float2	&	vWidthHeight, 
										const	float4	&	vPosition, 
										const	float4	&	vColor, 
										const	float	&	fRotation,
												bool		bXZ	= false);

	

	//	Render a single Quad with specific tex coords
	//	@param	vTxPosition		Specify the TxCoord position,	relative values
	//	@param	vTxSize			Specify the TxCoord size,		relative values
	//	@param	vWidthHeight	Specify the Width and height, scaling is 1:1
	//	@param	vPosition		Specify the Position, w should always be 1.0
	//	@param	vColor			Specify the Color in float units
	//	@param	fRotation		Specify the Rotation in Radians
	static	void		RenderQuad(	const	float2	&	vTxPosition, 
									const	float2	&	vTxSize,
									const	float2	&	vWidthHeight, 
									const	float4	&	vPosition,
									const	float4	&	vColor,
									const	float	&	fRotation,
											bool		bXZ	= false);

	//	Render a single quad with the provided vertices
	static	void		RenderQuad(const	Vertex	*	pVertices);



	static	void		TransformQuadVertex(		Vertex	*	pVertices,
											const	float2	&	vWidthHeight, 
											const	float4	&	vPosition, 
											const	float4	&	vColor, 
											const	float	&	fRotation,
											bool		bXZ	= false);
};

}